home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / GL / flip / hash.h < prev    next >
Text File  |  1994-08-01  |  2KB  |  54 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*
  18.  *    hash.h
  19.  *    Various functions for figuring out if we've seen
  20.  *    a vertex/edge before.  Uses very simple hashing schemes,
  21.  *  not appropriate for heavy-duty industrial use.
  22.  */
  23.  
  24. /*
  25.  *    These two functions return number of unique vertices/edge seen
  26.  */
  27. int h_get_nv(void);
  28. int h_get_ne(void);
  29.  
  30. /*
  31.  *    These functions initialize the tables; they must be given the
  32.  * maximum possible number of distinct vertices/edges
  33.  */
  34. void h_init_vertex(int);
  35. void h_init_edge(int);
  36.  
  37. /*
  38.  *    And these functions free up the space made in above
  39.  */
  40. void h_destroy_vertex(void);
  41. void h_destroy_edge(void);
  42.  
  43. /*
  44.  *    The useful functions.  Returns number of vertex/edge found.  These
  45.  * numbers are guaranteed to be unique for unique edges/vertices, and
  46.  * will increase by one every time a unique vertex/edge is found.
  47.  */
  48.  
  49. /* Argument points to a float[3], which should be x, y, and z */
  50. int h_find_vertex(float *);
  51.  
  52. /* Argument is vertex numbers found from h_find_vertex */
  53. int h_find_edge(int, int);
  54.